import post2Portal from 'src/api/common'

export const roleList = (data) => {
  let params = {
    api: '/sys/role/list',
    methods: 'GET',
    data: data
  }
  return post2Portal(params);
};

export const addRole = (data) => {
  let params = {
    api: '/sys/role/add',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};

export const removeRole = (data) => {
  let params = {
    api: '/sys/role/batch/remove',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};


export const updateRole = (data) => {
  let params = {
    api: '/sys/role/update',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};


export const getTree = () => {
  let params = {
    api: '/sys/role/selectList',
    methods: 'GET',
    data: {}
  }
  return post2Portal(params);
}
